package org.acghub.langchain4j.message;

import java.util.List;

public interface MessageMemory<Key, Value> {

    Value getLast(Key key);

    Value getFirst(Key key);

    List<Value> getHistory(Key key);

    Value get(Key key, int index);

    void addLast(Key key, Value value);

    void addFirst(Key key, Value value);

    void add(Key key, Value value, int index);

    void remove(Key key, int index);

    void removeFirst(Key key);

    void removeLast(Key key);

    void delete(Key key);

}
